package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.RepeatRule;

/**
 * 重复短信过滤规则 DTO 对象
 * @author wuluodan
 *
 */
public class RepeatRuleDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String repeatRuleId;
	
	@ColToProperty
	@TabCol(Index = 2, title = "剔重规则名称", width = "90")
	private String repeatRuleName;
	
	private String svrNode;
	
	@ColToProperty
	@TabCol(Index = 3, title = "业务端名称", width = "90")
	private String svrNodeName;
	
	private String serviceCode;
	
	@ColToProperty
	@TabCol(Index = 4, title = "短信类型名称", width = "90")
	private String serviceName;
	
	private String smSeq;
	
	@ColToProperty
	@TabCol(Index = 5, title = "序号剔重", width = "")
	private String smSeqStr;
	
	private String serviceCodeFlag;
	
	@ColToProperty
	@TabCol(Index = 6, title = "短信类型剔重", width = "75")
	private String serviceCodeFlagStr;
	
	private String userFlag;
	
	@ColToProperty
	@TabCol(Index = 7, title = "接收号码剔重", width = "75")
	private String userFlagStr;
	
	private String smFlag;
	
	@ColToProperty
	@TabCol(Index = 8, title = "短信内容剔重", width = "75")
	private String smFlagStr;
	
	@ColToProperty
	@TabCol(Index = 9, title = "剔重有效期（小时）", width = "115")
	private Integer timeLen;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 10, title = "状态", width = "")
	private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 11, title = "说明", width = "150")
	private String desc;
	
	public RepeatRuleDTO() {}
	
	public RepeatRuleDTO(RepeatRule entity) {
		this.setRepeatRuleId(entity.getRepeatRuleId());
		this.setRepeatRuleName(entity.getRepeatRuleName());
		this.setSvrNode(entity.getSvrNode());
		this.setServiceCode(entity.getServiceCode());
		this.setSmSeq(entity.getSmSeq());
		this.setServiceCodeFlag(entity.getServiceCodeFlag());
		this.setUserFlag(entity.getUserFlag());
		this.setSmFlag(entity.getSmFlag());
		this.setTimeLen(entity.getTimeLen());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getRepeatRuleId() {
		return repeatRuleId;
	}

	public void setRepeatRuleId(String repeatRuleId) {
		this.repeatRuleId = repeatRuleId;
	}

	public String getRepeatRuleName() {
		return repeatRuleName;
	}

	public void setRepeatRuleName(String repeatRuleName) {
		this.repeatRuleName = repeatRuleName;
	}

	public String getSvrNode() {
		return svrNode;
	}

	public void setSvrNode(String svrNode) {
		this.svrNode = svrNode;
	}

	public String getSvrNodeName() {
		return svrNodeName;
	}

	public void setSvrNodeName(String svrNodeName) {
		this.svrNodeName = svrNodeName;
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getSmSeq() {
		return smSeq;
	}

	public void setSmSeq(String smSeq) {
		this.smSeq = smSeq;
	}

	public String getSmSeqStr() {
		if (null == this.smSeq) {
			return "未知";
		}
		if (this.smSeq.equals("0")) {
			return "否";
		}
		if (this.smSeq.equals("1")) {
			return "是";
		}
		return "未知";
	}

	public void setSmSeqStr(String smSeqStr) {
		this.smSeqStr = smSeqStr;
	}

	public String getServiceCodeFlag() {
		return serviceCodeFlag;
	}

	public void setServiceCodeFlag(String serviceCodeFlag) {
		this.serviceCodeFlag = serviceCodeFlag;
	}

	public String getServiceCodeFlagStr() {
		if (null == this.serviceCodeFlag) {
			return "未知";
		}
		if (this.serviceCodeFlag.equals("0")) {
			return "否";
		}
		if (this.serviceCodeFlag.equals("1")) {
			return "是";
		}
		return "未知";
	}

	public void setServiceCodeFlagStr(String serviceCodeFlagStr) {
		this.serviceCodeFlagStr = serviceCodeFlagStr;
	}

	public String getUserFlag() {
		return userFlag;
	}

	public void setUserFlag(String userFlag) {
		this.userFlag = userFlag;
	}
	
	public String getUserFlagStr() {
		if (null == this.userFlag) {
			return "未知";
		}
		if (this.userFlag.equals("0")) {
			return "否";
		}
		if (this.userFlag.equals("1")) {
			return "是";
		}
		return "未知";
	}

	public void setUserFlagStr(String userFlagStr) {
		this.userFlagStr = userFlagStr;
	}

	public String getSmFlag() {
		return smFlag;
	}

	public void setSmFlag(String smFlag) {
		this.smFlag = smFlag;
	}

	public String getSmFlagStr() {
		if (null == this.smFlag) {
			return "未知";
		}
		if (this.smFlag.equals("0")) {
			return "否";
		}
		if (this.smFlag.equals("1")) {
			return "是";
		}
		return "未知";
	}

	public void setSmFlagStr(String smFlagStr) {
		this.smFlagStr = smFlagStr;
	}

	public Integer getTimeLen() {
		return timeLen;
	}

	public void setTimeLen(Integer timeLen) {
		this.timeLen = timeLen;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
